module Ssp
  class CurrentUsersController < ApplicationController
    def show
      @user = current_user
    end

    def edit
      @user = current_user
    end

    def update
      @user = current_user
      if @user.update_attributes(user_params)
        redirect_to ssp_root_path
      else
        render :edit
      end
    end

    private

    def user_params
      params.require(:ssp_user).permit(:password, :password_confirmation)
    end

  end
end
